package com.frxuexi.park2209.bus

import androidx.lifecycle.MutableLiveData

object LiveDataBus {

    var map= mutableMapOf<String,MutableLiveData<TextMessage>>()

    @Synchronized
    fun with(key:String):MutableLiveData<TextMessage>{
        if(!map.containsKey(key)){
            map[key]= MutableLiveData()
        }
        return map[key]!!
    }
}